//
//  LAPolyline.h
//  OutdoorAssistantApplication
//
//  Created by 罗亮富 on 2018/6/26.
//  Copyright © 2018年 Lolaage. All rights reserved.
//

#import <MapKit/MapKit.h>
#import "LAGMapProtocol.h"

//#warning exist use new
//地图polyline基类
@interface LAPolyline : MKPolyline<LAOverLayExt>


@property (nonatomic) NSInteger tag;
//如果线段已经添加到地图，设定下面的值需要调用-refreshPolyLine才可让设置生效
#if TARGET_OS_IPHONE
@property (strong, nullable) UIColor *fillColor; //default is yellow color
@property (nonatomic, copy) UIColor * lineColor;//轨迹线颜色 默认 redColor
#else
@property (strong, nullable) NSColor *fillColor; //default is yellow color
@property (nonatomic, copy) NSColor * lineColor;//轨迹线颜色 默认 redColor
#endif

@property (nonatomic) CGFloat lineStrokeWidth;//轨迹线宽度 default is 4.0
@property CGLineJoin lineJoin; // defaults to kCGLineJoinRound
@property CGLineCap lineCap; // defaults to kCGLineCapRound
@property CGFloat miterLimit; // defaults to 10
@property (copy, nullable) NSArray<NSNumber *> *lineDashPattern; // defaults to nil;
@property (nonatomic,strong) Class rendererClass;//sub class of MKPolylineRenderer, default is MKPolylineRenderer;

//其实是lazy weak 变量，访问的时候若backed store为nil则会创建一个新的renderer，但不会持有\
如果子类需要自定义renderer有两种途径，1.重写renderer的getter方法\
2.通过设置rendererClass和重写-setupRenderer:来达到自定义renderer的目的\
建议采用第二种方式
@property (nonatomic, weak, readonly) MKPolylineRenderer *renderer;
//for subclass override only
-(void)setupRenderer:(MKOverlayRenderer *)renderer;

-(void)refreshPolyLine;

//当更新了polyLine的坐标点时，需要调用次接口来更新区域及中心点坐标
-(void)setNeedsUpdateBoundingAndCenter;





@end
